<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>新增会员卡</title>
<link rel="stylesheet" href="../layui/css/layui.css">
</head>
<body>
<!-- 添加弹出框的div -->
 <div id="addlayer" style="">
	<form class="layui-form" action="/card/CardAdd">
		<!-- 第一行 -->
		<div class="layui-form-item">	  
		    <label class="layui-form-label">卡类型ID</label>
			<div class="layui-input-inline">
		    	<input type="text" name="cardId" id="cardId"  lay-reqtext="不能为空！" autocomplete="off" class="layui-input">
			</div>
			<label class="layui-form-label">会员卡类型</label>
			<div class="layui-input-inline">
		    	<input type="text" name="cardType" id="cardType" lay-verify="required" placeholder="请输入会员卡类型" autocomplete="off" class="layui-input">
			</div>				  
    	</div>
	    <!-- 第二行 -->
	    <div class="layui-form-item">
		    <label class="layui-form-label">有效时间</label>
			<div class="layui-input-inline">
		    	<input type="text" name="cardTime" id="cardTime"  lay-verify="required" placeholder="请输入可用时间 " autocomplete="off" class="layui-input">
			</div>
			<label class="layui-form-label">有效次数</label>
			<div class="layui-input-inline">
		    	<input type="text" name="cardFrequency" id="cardFrequency" required  placeholder="请输入有效次数" autocomplete="off" class="layui-input">
			</div>	
	    </div>
	    <!-- 第三行 -->
	    <div class="layui-form-item">
		    <label class="layui-form-label">积分</label>
			<div class="layui-input-inline">
		    	<input type="text" name="cardPoint" id="cardPoint" required  placeholder="请输入积分" autocomplete="off" class="layui-input">
			</div>
			<label class="layui-form-label">价格</label>
			<div class="layui-input-inline">
		    	<input type="text" name="cardPrice" id="cardPrice" required  placeholder="请输入卡价" autocomplete="off" class="layui-input">
			</div>
	    </div>
	    
	   <hr class="layui-bg-green">
	    <!-- 第四行按钮 -->
		<div class="layui-form-item">
		  <div class="layui-input-block" align="center">
		     <input type="submit" id="addsubmit" class="layui-btn"/>
		     <input type="reset" id="addreset" class="layui-btn layui-btn-primary"/>
	     </div>
	    </div>
	</form>
</div>  
<script src="../layui/layui.js"></script>
<script type="text/javascript">
	layui.use('jquery',function(){
		var $=layui.jquery;
		$(document).on('click','#addsubmit',function(){
			var index=parent.layer.getFrameIndex(window.name);
			parent.layer.close(index);
			//window.parent.location.reload();
		});	
	});
</script>
</body>
</html>